initial commit
[clinton/prusa3.git] / old stuff / pulley.scad
1 // Belt pulley is http://www.thingiverse.com/thing:3104 by GilesBathgate
2
3 // PRUSA Mendel
4 // Bushings
5 // GNU GPL v3
6 // Josef Průša
7 // josefprusa@me.com
8 // prusadjs.cz
9 // http://www.reprap.org/wiki/Prusa_Mendel
10 // http://github.com/prusajr/PrusaMendel
11
12
13 include <configuration.scad>
14
15
16 /**
17 * @id pulley
18 * @name Pulley
19 * @category Printed
20 * @using 1 m3nut
21 * @using 1 m3x10xhex
22 */
23 module pulley()
24 {
25
26
27 module spur()
28 {
29 linear_extrude(height=20) polygon([[-1,-1],[-1,1],[0.7,0.7],[0.7,-0.7]],[[0,1,2,3,0]]);
30 }
31
32 difference()
33 {
34 union()
35 {
36 //base
37 rotate_extrude($fn=30)
38 {
39 square([9,8]);
40 square([10,7]);
41 translate([9,7]) circle(1);
42 }
43
44 //shaft
45 cylinder(r=motor_shaft-0.2,h=20, $fn=8);
46
47 //spurs
48 for(i=[1:8]) rotate([0,0,i*(360/8)])
49 translate([5.6,0,0])spur();
50 }
51
52 //shaft hole
53 translate([0,0,-1])polyhole(motor_shaft+0.1,22);
54
55 //captive nut and grub holes
56 for(j=[1:1]) rotate([0,0,j*(360/3)])
57 translate([0,20,4])rotate([90,0,0])
58 union()
59 {
60 //entrance
61 translate([0,-3,15]) cube([m3_nut_diameter+0.5,5,3],center=true);
62 //nut
63 translate([0,0,13.6]) rotate([0,0,30]) nut(m3_nut_diameter+0.5, 3, false);
64 //grub hole
65 translate([0,0,9]) cylinder(r=m3_diameter/2,h=10, $fn=15);
66 }
67
68 }
69
70
71 }
72
73 pulley();